#include<iostream>
using namespace std;

const int N=2000;
int sign[N];

void dfs(int l, int r)
{
	if(l>r) return ;
	
	char ch;
	int x=sign[r]-sign[l-1];
	if(x==(r-l+1)) ch='I';
	else if(x==0) ch='B';
	else ch='F';
	if(l==r)
	{
		cout<<ch;
		return ;
	}
	
	int mid=(r+l)/2;
	dfs(l, mid);
	dfs(mid+1, r);
	
	cout<<ch;
}

int main()
{
	int n; cin>>n;
	n=(1<<n);
	for(int i=1; i<=n; i++)
	{
		char ch; cin>>ch;
		int k=0;
		if(ch=='1') k=1;
		sign[i]=sign[i-1]+k; 
	}
	
	dfs(1, n);
	return 0;
}
